Optimal. Leaf size=116 \[ \frac{\left (3 a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}-\frac{\left (a^2+b^2\right )^2}{b^5 d (a+b \tan (c+d x))}-\frac{4 a \left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \tan ^2(c+d x)}{b^3 d}+\frac{\tan ^3(c+d x)}{3 b^2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0968805, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ \frac{\left (3 a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}-\frac{\left (a^2+b^2\right )^2}{b^5 d (a+b \tan (c+d x))}-\frac{4 a \left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \tan ^2(c+d x)}{b^3 d}+\frac{\tan ^3(c+d x)}{3 b^2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3506
Rule 697
Rubi steps
\begin{align*} \int \frac{\sec ^6(c+d x)}{(a+b \tan (c+d x))^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^2}{(a+x)^2} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{3 a^2+2 b^2}{b^4}-\frac{2 a x}{b^4}+\frac{x^2}{b^4}+\frac{\left (a^2+b^2\right )^2}{b^4 (a+x)^2}-\frac{4 a \left (a^2+b^2\right )}{b^4 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=-\frac{4 a \left (a^2+b^2\right ) \log (a+b \tan (c+d x))}{b^5 d}+\frac{\left (3 a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}-\frac{a \tan ^2(c+d x)}{b^3 d}+\frac{\tan ^3(c+d x)}{3 b^2 d}-\frac{\left (a^2+b^2\right )^2}{b^5 d (a+b \tan (c+d x))}\\ \end{align*}
Mathematica [A] time = 2.77048, size = 122, normalized size = 1.05 \[ \frac{4 b \left (2 a^2+b^2\right ) \tan (c+d x)+\frac{b^4 \sec ^4(c+d x)-4 \left (a^2+b^2\right ) \left (3 a^2 \log (a+b \tan (c+d x))+a^2+3 a b \tan (c+d x) \log (a+b \tan (c+d x))+b^2\right )}{a+b \tan (c+d x)}-2 a b^2 \tan ^2(c+d x)}{3 b^5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.098, size = 174, normalized size = 1.5 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3\,{b}^{2}d}}-{\frac{a \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{{b}^{3}d}}+3\,{\frac{{a}^{2}\tan \left ( dx+c \right ) }{d{b}^{4}}}+2\,{\frac{\tan \left ( dx+c \right ) }{{b}^{2}d}}-{\frac{{a}^{4}}{d{b}^{5} \left ( a+b\tan \left ( dx+c \right ) \right ) }}-2\,{\frac{{a}^{2}}{{b}^{3}d \left ( a+b\tan \left ( dx+c \right ) \right ) }}-{\frac{1}{bd \left ( a+b\tan \left ( dx+c \right ) \right ) }}-4\,{\frac{{a}^{3}\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d{b}^{5}}}-4\,{\frac{a\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{{b}^{3}d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.1341, size = 155, normalized size = 1.34 \begin{align*} -\frac{\frac{3 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )}}{b^{6} \tan \left (d x + c\right ) + a b^{5}} - \frac{b^{2} \tan \left (d x + c\right )^{3} - 3 \, a b \tan \left (d x + c\right )^{2} + 3 \,{\left (3 \, a^{2} + 2 \, b^{2}\right )} \tan \left (d x + c\right )}{b^{4}} + \frac{12 \,{\left (a^{3} + a b^{2}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{5}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.29584, size = 656, normalized size = 5.66 \begin{align*} -\frac{4 \,{\left (3 \, a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (d x + c\right )^{4} - b^{4} - 2 \,{\left (3 \, a^{2} b^{2} + 2 \, b^{4}\right )} \cos \left (d x + c\right )^{2} + 6 \,{\left ({\left (a^{4} + a^{2} b^{2}\right )} \cos \left (d x + c\right )^{4} +{\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right )\right )} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \,{\left ({\left (a^{4} + a^{2} b^{2}\right )} \cos \left (d x + c\right )^{4} +{\left (a^{3} b + a b^{3}\right )} \cos \left (d x + c\right )^{3} \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2}\right ) + 2 \,{\left (a b^{3} \cos \left (d x + c\right ) - 2 \,{\left (3 \, a^{3} b + 2 \, a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{3 \,{\left (a b^{5} d \cos \left (d x + c\right )^{4} + b^{6} d \cos \left (d x + c\right )^{3} \sin \left (d x + c\right )\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{6}{\left (c + d x \right )}}{\left (a + b \tan{\left (c + d x \right )}\right )^{2}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.4407, size = 201, normalized size = 1.73 \begin{align*} -\frac{\frac{12 \,{\left (a^{3} + a b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}} - \frac{b^{4} \tan \left (d x + c\right )^{3} - 3 \, a b^{3} \tan \left (d x + c\right )^{2} + 9 \, a^{2} b^{2} \tan \left (d x + c\right ) + 6 \, b^{4} \tan \left (d x + c\right )}{b^{6}} - \frac{3 \,{\left (4 \, a^{3} b \tan \left (d x + c\right ) + 4 \, a b^{3} \tan \left (d x + c\right ) + 3 \, a^{4} + 2 \, a^{2} b^{2} - b^{4}\right )}}{{\left (b \tan \left (d x + c\right ) + a\right )} b^{5}}}{3 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]